//
//  UIColor+XYAdd.h
//  PeiJue
//
//  Created by lxy on 2017/9/27.
//  Copyright © 2017年 lixiya. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@interface UIColor (XYAdd)

/**
 *  两种颜色之间的渐变
 *
 *  @param percent 渐变百分率
 *  @param color1  颜色1
 *  @param color2  颜色2
 
 */
+ (UIColor *)xy_getColorOfPercent:(CGFloat)percent between:(UIColor *)color1 and:(UIColor *)color2;

/**
 *  随机颜色
 */
+ (UIColor *)xy_randomColor;
+ (UIColor *)xy_randomColorWithalpha:(CGFloat)alpha;
/**
 *  十六进制颜色
 */
+ (UIColor *)xy_colorWithHexColorString:(NSString *)hexColorString;

/**
 *  十六进制颜色:含alpha
 */
+ (UIColor *)xy_colorWithHexColorString:(NSString *)str alpha:(float)alpha;


@end
NS_ASSUME_NONNULL_END

